PLC Programming using C